package jtk.project4.fleet.field;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.TableField;
import nl.coderight.jazz.form.field.TableField.AutoResizeMode;
import nl.coderight.jazz.form.field.button.CheckButton;

public class PMandRepairMaintenanceDueField extends GroupControl {

	private TableField<String> pmandRepairMaintenanceDueTable;
	
	public PMandRepairMaintenanceDueField(String bindID){
		setTitle("header.PMandRepairMaintenanceDue");
		setBindID(bindID);
		createField();
		createLayout();
	}
	
	private void createField() {
		
		pmandRepairMaintenanceDueTable = new TableField<String>("pmandRepairMaintenanceDueTable","pmandRepairMaintenanceDueTable");
		pmandRepairMaintenanceDueTable.setTitle("pmandRepairMaintenanceDueTable.header.table");
		pmandRepairMaintenanceDueTable.setAutoResizeMode(AutoResizeMode.OFF);
		pmandRepairMaintenanceDueTable.getSelectionValues();
		
		pmandRepairMaintenanceDueTable.addColumn("label.pmservicename","pmServiceName");
		pmandRepairMaintenanceDueTable.addColumn("label.type","type");
		pmandRepairMaintenanceDueTable.addColumn("label.workorder","workOrder");
		pmandRepairMaintenanceDueTable.addColumn("label.date1","date1");
		pmandRepairMaintenanceDueTable.addColumn("label.kilometers1","kilometers1");
		pmandRepairMaintenanceDueTable.addColumn("label.date2","date2");
		pmandRepairMaintenanceDueTable.addColumn("label.kilometers2","kilometers2");
		pmandRepairMaintenanceDueTable.addColumn("label.date3","date3");
		pmandRepairMaintenanceDueTable.addColumn("label.kilometers3","kilometers3");
	}
	
	private CheckButton tesCheckButton;{
		tesCheckButton = new CheckButton("Required Maintenance");
	}
	
	private CheckButton tessCheckButton;{
		tessCheckButton = new CheckButton("Work Order assignet");
	}
	
	
		private void createLayout() {
			setLayout(new FormLayout())
			.addField(pmandRepairMaintenanceDueTable)
			.addRow()
			.addField(tesCheckButton)
			.addRow()
			.addField(tessCheckButton);
		
	}
}
